$(function() {
    FastClick.attach(document.body); 
});
(function ($) {
  $.fn.slideDown = function (duration) {    
    // get old position to restore it then
    var position = this.css('position');
    // show element if it is hidden (it is needed if display is none)
    this.show();
    
    // place it so it displays as usually but hidden
    this.css({
      position: 'absolute',
      visibility: 'hidden'
    });
 
    // get naturally height
    var height = this.height();
    
    // set initial css for animation
    this.css({
      position: position,
      visibility: 'visible',
      overflow: 'hidden',
      height: 0
    });
 
    // animate to gotten height
    this.animate({
      height: height
    }, duration);
  };
})(Zepto);
$(function(){
	$('.saixuan').on('touchend',function(){
		if($(this).is('.active')){
			$(this).removeClass('active');
			$('.saixuan-mune').hide()
		}else{
			$(this).addClass('active');
			$('.saixuan-mune').slideDown(200);
		}
		
		event.preventDefault();
	})
	// $('.saixuan-mune li').unbind().on('tap',function(event){
	// 		var text = $(this).text();
	// 		$('.saixuan').find('p').text(text);
	// 		$('.saixuan-mune li').removeClass('checked');
	// 		$(this).addClass('checked');
	// 		$('.saixuan').removeClass('active');
	// 		$('.saixuan-mune').hide();
	// 		event.stopPropagation();
	// 		var $start = '';
	// 		var $end   = '';
	// 		if(text=='0分~100分'){
     //            $start = 0;
     //            $end   = 100;
     //        }else if(text='100分~1000分'){
     //            $start = 100;
     //            $end   = 1000;
     //        }else if(text='1000分~无限'){
     //            $start = 1000;
     //            $end   = '无限';
     //        }else if(text='无限制'){
     //            $start = 0;
     //            $end   = '无限';
     //        }
     //        $.post("");
	// 	})
})
